import request from '@/utils/request'

// 查询全局优惠券列表
export function listSalesCoupon(query) {
  return request({
    url: '/wx/SalesCoupon/list',
    method: 'get',
    params: query
  })
}

// 查询全局优惠券详细
export function getSalesCoupon(id) {
  return request({
    url: '/wx/SalesCoupon/' + id,
    method: 'get'
  })
}

// 新增全局优惠券
export function addSalesCoupon(data) {
  return request({
    url: '/wx/SalesCoupon',
    method: 'post',
    data: data
  })
}

// 修改全局优惠券
export function updateSalesCoupon(data) {
  return request({
    url: '/wx/SalesCoupon',
    method: 'put',
    data: data
  })
}

// 删除全局优惠券
export function delSalesCoupon(id) {
  return request({
    url: '/wx/SalesCoupon/' + id,
    method: 'delete'
  })
}

// 导出全局优惠券
export function exportSalesCoupon(query) {
  return request({
    url: '/wx/SalesCoupon/export',
    method: 'get',
    params: query
  })
}